﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Oplaco.Web.DTO.IMPL;
using Oplaco.Web.DTO;

public partial class Controls_StatsControl : System.Web.UI.UserControl
{
    private CachedStatisticsCollection statsCollection;
    private Dictionary<string, string> statItem;

    public bool ShowAdStats { get; set; }
    public bool ShowUserStats { get; set; }
    public bool ShowCategoryStats { get; set; }

    public String CssClass { get; set; }

    protected void Page_Load(object sender, EventArgs e)
    {

        if (ShowAdStats) this.HandleAdStats();
    }


    #region private
    private void HandleAdStats()
    {
        ListViewAdsStats.Visible = true;

        statsCollection = StatisticsManager.Fetch(HttpContext.Current);


        ListViewAdsStats.DataSource = statsCollection;
        ListViewAdsStats.DataBind();

    }


    #endregion
}